<#include "../common/layout.ftl"/>
<@layout>
<div class="well">
		<h1>会员订单</h1>
		<span class="input-group-addon">&nbsp;客户姓名:</span><span class="label label-warning" style="font-size:14px;" >${member.real_name}</span>
  <span class="input-group-addon">&nbsp;&nbsp;&nbsp;&nbsp;手机号:</span><span class="label label-warning" style="font-size:14px;" >${member.cell_phone}</span>
  <span class="input-group-addon">&nbsp;&nbsp;&nbsp;&nbsp;总单量:</span><span class="label label-warning" style="font-size:14px;" >${order_count}</span>
  <span class="input-group-addon">&nbsp;&nbsp;&nbsp;&nbsp;取消单量:</span><span class="label label-warning" style="font-size:14px;" >${cancel_order_count}</span>
  <span class="input-group-addon">&nbsp;&nbsp;&nbsp;&nbsp;本月单量:</span><span class="label label-warning" style="font-size:14px;" >${month_order_count}</span>
  <span class="input-group-addon">&nbsp;&nbsp;&nbsp;&nbsp;消费总额:</span><span class="label label-warning" style="font-size:14px;" >${finishmoney}元</span>
  </div>

<div class="well">

	<table class="table table-bordered table-striped">
		<thead>
		  <tr>
			<th>单号</th>
			<th>订单状态</th>
			<th>目标方向</th>
			<th>起点</th>
			<th>终点</th>
			<th>里程</th>
			<th>总金额</th>
			<th>支付方式</th>
			<th>订单类型</th>
			<th>下单时间</th>
			<th>代驾员姓名</th>
			<th>代驾员工号</th>
			<th>联系方式</th>
			<th>接受时间</th>
			<th>到达时间</th>
			<th>开始代驾时间</th>
			<th>完成时间</th>
			<th>投诉</th>
			<th>操作</th>
		  </tr>
		</thead>
		<tbody>
		<#list list as order>
		  <tr>
		  <td>${order.id}</td>
			<td>
			 <#if order.order_state == 0>
					  	<span class="label">已派单</span>
					  <#elseif order.order_state == 1>
					  	<span class="label label-success">订单已接受</span>
					  <#elseif order.order_state == 2>
					  	<span class="label label-warning">到达出发地</span>
					  <#elseif order.order_state == 3>
					  	<span class="label label-important">开始代驾</span>
					  <#elseif order.order_state == 4>
					  	<span class="label label-info">结束代驾</span>
					  <#elseif order.order_state == 5>
					  	<span class="label label-inverse">已取消</span>
					  <#elseif order.order_state == 6>
					  	<span class="label label-inverse">待分派</span>
					  	<#elseif order.order_state == 7>
					  	<span class="label label-inverse">待客服审核</span>
					  	<#elseif order.order_state ==8>
					  	<span class="label label-inverse">未接取消</span>
					  	<#elseif order.order_state ==9>
					  	<span class="label label-inverse">已接取消</span>
					  	<#elseif order.order_state ==10>
					  	<span class="label label-inverse">未接取消已审</span>
					  	<#elseif order.order_state ==11>
					  	<span class="label label-inverse">已接取消已审</span>
					  	<#elseif order.order_state ==12>
					  	<span class="label label-inverse">已撤销</span>
					  	<#elseif order.order_state ==13>
					  	<span class="label label-inverse">撤销已审</span>
					  	<#elseif order.order_state ==14>
					  	<span class="label label-inverse">临时订单已审</span>
					  	<#elseif order.order_state ==15>
					  	<span class="label label-inverse">临时订单已取消</span>
					  <#else>
					  	<span class="label">其他</span>
					  </#if>
			</td>
			<td>
			 ${order.userarea!" "}
			</td>
			<td>
			 ${order.startpoint!" "}
			</td>
			<td>
			 ${order.endpoint!" "}
			</td>
			<td>
			 ${order.kilometre!" "}
			</td>
			<td>
			 ￥${order.totalmoney!" "}
			</td>
			<td>
			 <#if order.pay_type == 0>
			  	<span class="label label-info">现金</span>
			  <#elseif order.pay_type == 1>
			  	<span class="label label-warning">企业支付</span>
			  <#elseif order.pay_type == 2>
			  	<span class="label label-success">VIP支付</span>
			  <#elseif order.pay_type == 3>
			  	<span class="label label-success">免费客户</span>
			  <#else>
			  	<span class="label label-inverse">其他</span>
			  </#if>
			</td>
			<td>
			   <#if order.order_type == 0>
			  	<span class="label label-info">普通</span>
			  <#elseif order.order_type == 1>
			  	<span class="label label-info">企业订单</span>
			  <#elseif order.order_type == 2>
			  	<span class="label label-info">酒店订单</span>
			  <#elseif order.order_type == 3>
			  	<span class="label label-info">KTV订单</span>
			   <#elseif order.order_type == 4>
			  	<span class="label label-info">VIP订单</span>
			  <#else>
			  	<span class="label label-inverse">其他</span>
			  </#if>
			</td>
			<td>
			 ${order.create_time!" "}
			</td>
			<td>
			 ${order.driver_name!" "}
			</td>
			<td>
			 ${order.job_number!" "}
			</td>
			<td>
			 ${order.driver_phone!" "}
			</td>
			<td>
			 ${order.accept_time!" "}
			</td>
			<td>
			 ${order.arrived_time!" "}
			</td>
			<td>
			 ${order.driver_begin_time!" "}
			</td>
			<td>
			 ${order.driver_finish_time!" "}
			</td>
			<td>
			 ${order.complaint_content!" "}
			</td>
			<td>
				<!--a class="btn btn-primary" href="/order/addByHistory/${order.id}"><i class="icon-leaf icon-white"></i> 生成新订单</a-->
				<a class="btn btn-primary" href="/order/${order.id}"><i class="icon-leaf icon-white"></i> 生成新订单</a>
			</td>
		  </tr>
		</#list>
		</tbody>
	</table>
</div>

</@layout>